package boot.controller;

import boot.bean.SomeBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/opt")
public class OperationController {

    @Autowired
    private SomeBean someBean;

    @RequestMapping("/add")
    public String add(){
        System.out.println("OperationController.add()");
        System.out.println(someBean);
        return "add";
    }

    @RequestMapping("/remove")
    public String remove(){
        System.out.println("OperationController.remove()");
        return "remove";
    }

    @RequestMapping("/modify")
    public String modify(){
        System.out.println("OperationController.modify()");
        return "modify";
    }

    @RequestMapping("/find")
    public String find(){
        System.out.println("OperationController.find()");
        return "find";
    }
}